<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>检测对象类型</title>
</head>

<body>
    <script>
        let a = {};
        let b = {};
        console.log(a == b); // false
        console.log(a === b); // false
        let c = [1, 2, 3, 4];
        let d = "1,2,3,4";
        console.log(c == d);
        let e = {
            test1: 1,
            test2: 2
        }
        console.log(e.valueOf()); // "1,2,3,4"
        console.log(e.toString()); // [object,object]
        let f = [1, 2, 3, 4];
        let g = [1, 2, 3, 4];
        console.log(f == g);
        console.log(f === g);
    </script>
</body>

</html>